package com.zy.bean.qo.base;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * @author hanhuafeng
 * @version V1.0
 * @description
 * @date 2023/1/29
 */
public class PageBaseQo<T> {
    /**
     * 分页容量
     */
    private Long size;
    /**
     * 当前页
     */
    private Long current;

    public Long getSize() {
        return size == null ? 10L : size;
    }

    public Long getCurrent() {
        return current == null ? 1L : current;
    }

    public void setSize(Long size) {
        this.size = size == null ? 10L : size;
    }

    public void setCurrent(Long current) {
        this.current = current == null ? 1L : current;
    }

    public Page<T> getPage(){
        return new Page<>(getCurrent(), getSize());
    }
}
